/**      
 * @file		ConstructionDestruction.cpp
 * @description		This example shows how constructors and destructors are
 *			called.
 * @course		CSCI 123 Section 00000
 * @assignment 
 * @date		mm/dd/yyyy
 * @author		Brad Rippe (00000000) brippe@fullcoll.edu
 * @version		1.0
 */
#include <iostream>
using namespace std;

/**
 * Represents a person
 * Nothing special, constructor, destructor
 * @author: Brad Rippe (brippe@fullcoll.edu) 
 */
class Person {
public:

	/**
	 * Constructs a Person
	 */
	Person() {
		cout << "Person's constructor is invoked" << endl;
	}

	/**
	 * Destroys a Person
	 */
	~Person() {
		cout << "Person's destructor is invoked" << endl;
	}
};


/**
 * Represents an Employee
 * Usually class declaration and definitions are done in separate
 * files. I'm adding the documentation as if they were in separate files
 * @author: Brad Rippe (brippe@fullcoll.edu)
 */
class Employee: public Person {
public:

	/**
	 * Constructs an Employee
	 */
	Employee() {
		cout << "Employee's constructor is invoked" << endl;
	}

	/**
	 * Destroys an Employee
	 */
	~Employee() {
		cout << "Employee's destructor is invoked" << endl;
	}
};


/**
 * Represents a Faculty member
 * Same deal here, see comment in Employee
 * @author: Brad Rippe (brippe@fullcoll.edu) 
 */
class Faculty: public Employee {
public:

	/**
	 * Constructs a Faculty object
	 */
	Faculty() {
		cout << "Faculty's constructor is invoked" << endl;
	}


	/**
	 * Destroys a Faculty object
	 */
	~Faculty() {
		cout << "Faculty's destructor is invoked" << endl;
	}
};

/**
 * @return zero if the application executes successfully
 */
int main() {

	// Compile and run to see what constructs and destructors 
	// get called
	// Do you have to explicitly call a Parent class constructor?
	// Do you have to explicitly call a Parent class destructor?
	// What's the order constructors are called?
	// What's the order destructors are called?
	// all good exam questions
	Faculty myFaculty;
	return 0;
}
